/*
 Navicat Premium Dump SQL

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80404 (8.4.4)
 Source Host           : localhost:3306
 Source Schema         : big_event

 Target Server Type    : MySQL
 Target Server Version : 80404 (8.4.4)
 File Encoding         : 65001

 Date: 18/04/2025 17:32:38
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `title` varchar(30) NOT NULL COMMENT '文章标题',
  `content` varchar(10000) NOT NULL COMMENT '文章内容',
  `cover_img` varchar(128) NOT NULL COMMENT '文章封面',
  `state` varchar(3) DEFAULT '草稿' COMMENT '文章状态: 只能是[已发布] 或者 [草稿]',
  `category_id` int unsigned DEFAULT NULL COMMENT '文章分类ID',
  `create_user` int unsigned NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `fk_article_category` (`category_id`),
  KEY `fk_article_user` (`create_user`),
  CONSTRAINT `fk_article_category` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`),
  CONSTRAINT `fk_article_user` FOREIGN KEY (`create_user`) REFERENCES `user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article
-- ----------------------------
BEGIN;
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (1, 'Ms.', 'mHCrPD5NZG', '4F9JdrvJfa', 'Cmx', 12, 14, '2016-03-21 20:15:26', '2003-12-03 18:48:52');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (2, 'Mr.', 'PrUT9Bq5id', 'zSoKNpG5x3', 'Oyp', 18, 9, '2004-08-01 01:28:21', '2000-12-24 12:47:05');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (3, 'Mrs.', 'ROxeVO2Kww', 'jLROrubzMn', '9H8', 13, 8, '2010-02-14 23:28:54', '2023-06-26 16:57:05');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (4, 'Mrs.', '6Yl9tuPAza', 'StJweXs2eb', 'lHU', 19, 6, '2003-05-03 11:45:12', '2017-03-04 07:29:38');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (5, 'Ms.', 'KFyJCjo2Jj', '34yDDTdv8R', 'Ssv', 15, 7, '2012-03-26 12:10:13', '2014-04-20 02:29:13');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (6, 'Prof.', 'NZz5x5hDAC', '3HbD0JUZxJ', 'I2T', 12, 8, '2018-09-13 03:50:51', '2007-01-23 10:43:11');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (7, 'Ms.', 'SDd7brSQsP', 'PTsLSe2lqo', 'xdi', 12, 9, '2010-05-25 03:41:22', '2014-05-31 12:15:29');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (8, 'Mr.', 'kYhQ8Vlqe3', 'RP0KGfZ0wv', 'hGW', 13, 8, '2014-01-22 05:11:33', '2022-06-13 16:19:52');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (9, 'Prof.', 'DnN1EiKJNJ', 'MEVikihjmf', 'ncL', 18, 7, '2024-09-01 04:18:54', '2002-11-29 20:55:48');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (10, 'Ms.', 'NcDdOygcSQ', 'feCEOpuzOG', 'Wue', 17, 10, '2016-09-02 06:04:50', '2013-12-23 05:54:30');
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`) VALUES (11, '长沙旅游攻略', '天安门...爱去哪去哪...', 'https://big-event-gwd.oss-cn-beijing.aliyuncs.com/9bf1cf5b-1420-4c1b-91ad-e0f4631cbed4.png', '', 12, 15, '2025-04-17 16:35:03', '2025-04-17 16:35:03');
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `category_name` varchar(32) NOT NULL COMMENT '分类名称',
  `category_alias` varchar(32) NOT NULL COMMENT '分类别名',
  `create_user` int unsigned NOT NULL COMMENT '创建人ID',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `fk_category_user` (`create_user`),
  CONSTRAINT `fk_category_user` FOREIGN KEY (`create_user`) REFERENCES `user` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (12, 'Otsuka Kaito', 'aTl5byGXdm', 9, '2012-07-03 22:01:05', '2020-08-14 08:22:26');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (13, 'Deng Anqi', 'rvhfyO8Mnt', 15, '2011-11-14 06:22:13', '2015-03-30 07:46:12');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (14, 'Ito Rin', '0DDjtl74Et', 6, '2007-07-30 03:43:00', '2010-12-12 20:47:11');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (15, 'Lori Sanders', 'iWmnSY8BZi', 10, '2016-01-28 07:49:45', '2021-05-09 23:02:18');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (16, 'Miyamoto Hazuki', 'JCBzUr4gvL', 15, '2013-02-14 21:04:42', '2006-05-10 04:09:02');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (17, 'Tang Kwok Ming', 'E2pVvPFf3l', 6, '2023-01-31 22:18:59', '2011-08-17 17:58:00');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (18, 'Kobayashi Mio', 'odEltzBj4r', 7, '2005-02-02 05:16:40', '2023-06-29 00:19:31');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (19, 'Hsuan On Kay', 'leKjn7YouT', 14, '2014-02-08 00:53:26', '2007-10-24 13:37:23');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (20, 'Tong Wing Kuen', 'xaI79wf3pF', 9, '2016-07-30 08:54:22', '2008-04-12 17:44:47');
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_user`, `create_time`, `update_time`) VALUES (21, 'ygg', 'ty', 15, '2025-04-17 14:00:28', '2025-04-17 14:00:28');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `username` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名',
  `password` varchar(32) DEFAULT NULL COMMENT '密码',
  `nickname` varchar(10) DEFAULT '' COMMENT '昵称',
  `email` varchar(128) DEFAULT '' COMMENT '邮箱',
  `user_pic` varchar(288) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '头像',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表';

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (6, 'Che Wing Sze', 'myL29PZZj6', '杜惠敏', 'wingszec@outlook.com', 'T78CzOMeLm', '2023-03-21 02:31:39', '2006-06-01 04:27:50');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (7, 'Kong Tin Wing', 'N4fx2i5w8S', '黎秀英', 'tinwingkong@outlook.com', 'kmGTMgcrSQ', '2019-09-27 22:43:18', '2010-12-24 20:52:54');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (8, 'Loui Sai Wing', '8sjkXpr1px', '梁思妤', 'losw5@hotmail.com', 'wpzlUM5QBv', '2024-11-01 19:18:26', '2020-08-13 07:58:21');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (9, 'Arai Ryota', 'SCCLYKLEAs', '钱致远', 'ryota417@mail.com', '08Z6zOWMnk', '2023-03-05 12:39:43', '2013-02-18 19:35:53');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (10, 'Fujii Rin', 'G8JtqGU16n', '汤嘉伦', 'frin707@gmail.com', 'UJHtn7zG3w', '2012-01-29 10:26:05', '2001-07-15 11:24:02');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (12, 'yxy', NULL, '', '', '', '2025-04-16 21:27:28', '2025-04-16 21:27:28');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (13, 'ty', '708916b2d41a484a36ce6ed24a5c2917', '', '', '', '2025-04-16 21:46:37', '2025-04-16 21:46:37');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (14, 'gp', '1235', 'ASDA', 'ryota417@mail.com', 'https://big-event-gwd.oss-cn-beijing.aliyuncs.com/9bf1cf5b-1420-4c1b-91ad-e0f4631cbed4.png', '2025-04-16 22:59:11', '2025-04-17 12:23:08');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `create_time`, `update_time`) VALUES (15, 'gpp', '202cb962ac59075b964b07152d234b70', '', '', '', '2025-04-17 12:27:39', '2025-04-17 12:37:12');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
